from selenium.webdriver.common.by import By

class  Loginlocator:
    #登录的用户名
    login_username_ele=(By.ID,'username')
    #登录的密码
    login_password_ele=(By.ID,'password')
    #登录的固定验证码
    verification_code=(By.CSS_SELECTOR,'[id="imageVerifyCode"]>:nth-child(1)>input')
    #登录按钮
    login_submit_ele=(By.XPATH,"//form[contains(@class,'vertical')]/button")
    #邮箱验证
    email_verification_code=(By.XPATH,"//input[@id='creForm_verifyCode']")
    #邮箱验证ok
    email_submit_ele=(By.CSS_SELECTOR,'[class="antd4-btn antd4-btn-primary"]')
    #发送验证码
    send_code_ele=(By.XPATH, '//span[text() = "Send"]')
    #验证码填写框
    opt_code_input_ele=(By.ID,'creForm_verifyCode')
    #登录成功首页元素
    login_success_ele=(By.CSS_SELECTOR,'[class="cre-sider-menu-header"]')

    #注册
    #注册邮箱
    register_email=(By.ID,'email')
    #注册邮箱验证码
    register_email_verification=(By.ID,'code')
    #注册密码
    register_password=(By.CSS_SELECTOR,'[placeholder="Your password"]')
    #确认注册密码
    register_confirm_password=(By.CSS_SELECTOR,'[placeholder="Confirm your password"]')
    #注册下一步按钮
    register_nextstep=(By.XPATH,"//button[contains(@class,'btn___GFwqW')]")
    #发送验证码按钮
    register_send_verification=(By.XPATH,"//button[contains(@class,'veriButton___IlcWB')]")

    #点击注册
    click_register = (By.XPATH, '(//a[@href="/register"])[2]')
    #send按钮不可点击
    disabled_send = (By.XPATH, '(//button[@class="antd4-btn antd4-btn-primary antd4-btn-lg antd4-btn-background-ghost veriButton___IlcWB disabled___2m8c_"])[1]')
    #验证码输入框
    input_code = (By.XPATH, '(//input[@id="code"])[1]')
    #email输入框
    input_email = (By.XPATH, '(//input[@id="email"])[1]')
    #send可以点击
    click_send = (By.XPATH, '(//button[@class="antd4-btn antd4-btn-primary antd4-btn-lg antd4-btn-background-ghost veriButton___IlcWB veriButtonAnimation___2XE_3"])[1]')
    #倒计时按钮
    countdown = (By.XPATH, '(//button[@class="antd4-btn antd4-btn-primary antd4-btn-lg antd4-btn-background-ghost antd4-btn-loading veriButton___IlcWB veriButtonStatic___Lq-cs"])[1]')


    #个人头像
    personal_portrait=(By.CSS_SELECTOR,'[alt="avatar"]')

    #logout
    logout=(By.XPATH,"//li[contains(@data-menu-id,'logout')]")

    #dshboard_ele
    dshboard_ele=(By.XPATH,"//div[contains(@class,'btn___')]")

    #admin_home_page
    admin_home_page=(By.CSS_SELECTOR,'[class="antd4-space-item"]')

